<%@page import="helpers.StringHelper"%>
<%@page import="entities.SiteConfig"%>
<%@page import="java.util.TreeMap"%>
<%@page import="helpers.UrlHelper"%>
<%@page import="java.util.ArrayList"%>
<%
	TreeMap check = (TreeMap) request.getAttribute("check");
	TreeMap values = (TreeMap) request.getAttribute("values");
	String success = (String) request.getAttribute("success");
	SiteConfig siteConfig = (SiteConfig) request.getAttribute("config");
	String image = UrlHelper.getServerUrl(request) + "/blobstore-serve?blob-key=" + siteConfig.getLogo();
	
	//Set content for seo
	String domainServer = UrlHelper.getDomainServer(request);
	String title = domainServer  + " - Contact Us";
	String description = "We would love to hear from you, please use the contact form below to send us an email or alternatively contact us on one of the other methods below";
	String keywords = domainServer + ", contact, contact us, web site analysis, website traffic details, server information, website ranking info, check information my domain" ;
	String url = UrlHelper.getServerUrl(request) + "/contact-us";
%>

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="/layouts/header.jsp">
	<jsp:param name="title" value="<%=title %>" />
    <jsp:param name="description" value="<%=description %>" />
    <jsp:param name="keywords" value="<%=keywords %>" />
    <jsp:param name="ogtitle" value="<%=title %>" />
    <jsp:param name="ogurl" value="<%=url %>" />
    <jsp:param name="ogdescription" value="<%=description%>" />
</jsp:include>

	<script type="text/javascript" src="/js/contact.js"></script>
				<div id="leftSideContent">
                	<section class="block">
                    	<div class="blockContent">
                            <h3 class="blockHeading"><span>Contact Us</span></h3>
                            <div class="contactUs">
                            	<p class="topIntro">
                                	We would love to hear from you, please use the contact form below to send us an email or 
									alternatively contact us on one of the other methods below:
                                </p>
                                <form method="post" action="">
                                	<div class="gridLayout gridLayout2 clearafter">
                                        <div class="gridCol">
                                            <div class="gridCol_inner">
                                                <label class="<%=check.get("name") != null ? "error" : "" %>">
                                                    <span>
                                                    	Your Name :
                                                    	<% if (check.get("name") != null ) { %>
														<span class="errorMessage"><%=check.get("name") %></span>
														<% } %>
                                                    </span>
                                                    <input type="text" name="name" value="<%=values.get("name") != null ? values.get("name") : "" %>">
                                                </label>
                                                <label class="<%=check.get("email") != null ? "error" : "" %>">
                                                    <span>
                                                    	Your Email :
                                                    	<% if (check.get("email") != null ) { %>
														<span class="errorMessage"><%=check.get("email") %></span>
														<% } %>
                                                    </span>
                                                    <input type="text" name="email" value="<%=values.get("email") != null ? values.get("email") : "" %>">
                                                </label>
                                                <label class="<%=check.get("title") != null ? "title" : "" %>">
                                                    <span>Message Title :</span>
                                                    <input type="text" name="title" value="<%=values.get("title") != null ? values.get("title") : "" %>">
                                                </label>
                                                <div class="captcha">
                                                	<% if (check.get("captcha") != null) { %>
														<span class="errorMessage"><%=check.get("captcha")%></span>
													<% } %>
                                                	<script>
											        	var RecaptchaOptions = { theme : 'red'};
											  		</script>
													<script type="text/javascript" src="http://api.recaptcha.net/challenge?k=6LeA0c4SAAAAAMsdjrB49GPol6XImTdJM2U2AHrF"></script>
												</div>
                                           </div>
                                        </div>                                        
                                        <div class="gridCol lastCol">
                                            <div class="gridCol_inner">
                                                <label class="<%=check.get("content") != null ? "error" : "" %>">
                                                    <span>Message Content :</span>
                                                    <textarea name="content"><%=values.get("content") != null ? values.get("content") : "" %></textarea>
                                                </label>                                               
                                            </div>
                                        </div>
                                    </div>
                                    <div class="content-center">
                                    	<button type="submit">Send</button>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <div class="blockShadow"></div>
                    </section>                	
                </div>
				
				<!-- right content -->
                <jsp:include page="/elements/right.jsp" />
                <!-- end right content -->

<jsp:include page="/layouts/footer.jsp" />